<template>
	<view class="box flex-no-horizontal">
		<button type="default" class="err flex-no-horizontal" @click="errClick">{{errText}}</button>
		<button type="default" class="success flex-no-horizontal" @click="successClick">{{successText}}</button>
	</view>
</template>

<script>
	/**
	 * @property {String}			errText					红色按钮文字。默认：'不通过'
	 * @property {String}			successText				绿色按钮文字。默认：'通过'
	 * @event {Function}			btnErrClick				红色按钮点击回调
	 * @event {Function}			btnSuccessClick			绿色按钮点击回调
	 */
	export default {
		props: {
			errText: {
				type: String,
				default () {
					return '不通过';
				}
			},
			successText:{
				type: String,
				default () {
					return '通过';
				}
			},
		},
		data() {
			return {
				
			};
		},
		computed: {
	
		},
		methods: {
			errClick(){
				this.$emit('btnErrClick')
			},
			successClick(){
				this.$emit('btnSuccessClick')
			},
		},
	};
</script>

<style lang="scss">
	
	.box{
		width: 100%;
		height: 82rpx;
		justify-content: space-between;
		.err{
			width: 47%;
			height: 100%;
			font-size: 28rpx;
			background-color: rgba(241, 65, 65, 1);
			color: #FFFFFF;
			border-radius: 40rpx;
			justify-content: center;
			margin: 0;
		}
		
		.success{
			width: 47%;
			height: 100%;
			font-size: 28rpx;
			border-radius: 40rpx;
			color: #FFFFFF;
			background-color: rgba(59, 164, 73, 1);
			justify-content: center;
			margin: 0;
		}
		
	}
	
</style>
